#ifndef JSONDESERIALIZATOR_H
#define JSONDESERIALIZATOR_H

#include <QStringList>
#include <QVariant>
#include "serializator.h"

namespace Core
{

class JSONDeserializator : public IDeserializator
{
private:
    QStringList data;

    QString getNextLine(bool remove = true);
public:
    JSONDeserializator(const QString& data);

    void beginObject();
    void endObject();
    bool atEnd();

    QString readPropertyName();
    PropertyType readPropertyType();
    QVariant readPropertyValue();

    void beginList();
    void endList();

    PropertyType readListItemType();
    QVariant readListItem();
};

}

#endif // JSONDESERIALIZATOR_H
